<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>持续集成与持续部署实践指南 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background-color: #f9fafb;
            color: #1f2937;
            line-height: 1.6;
        }
        .serif {
            font-family: 'Noto Serif SC', serif;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .highlight {
            position: relative;
        }
        .highlight::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 40%;
            background-color: rgba(167, 139, 250, 0.3);
            z-index: -1;
            transition: all 0.3s ease;
        }
        .highlight:hover::after {
            height: 60%;
        }
        .mermaid-tooltip {
            background-color: white;
            padding: 8px 16px;
            border-radius: 4px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            font-size: 14px;
            position: absolute;
            z-index: 100;
            display: none;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-24 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col items-center text-center">
                <span class="bg-white bg-opacity-20 rounded-full px-4 py-1 mb-4 text-sm font-medium">开发最佳实践</span>
                <h1 class="serif text-4xl md:text-5xl font-bold mb-6 leading-tight">持续集成与持续部署<br>现代化开发流程的核心实践</h1>
                <p class="text-xl max-w-3xl mb-8 opacity-90">通过自动化构建、测试和部署，实现高效、可靠的软件交付流程，加速产品迭代与创新。</p>
                <div class="flex gap-4">
                    <a href="#ci-cd-intro" class="bg-white text-indigo-600 px-6 py-3 rounded-lg font-medium hover:bg-opacity-90 transition duration-200">开始探索</a>
                    <a href="#benefits" class="bg-transparent border-2 border-white px-6 py-3 rounded-lg font-medium hover:bg-white hover:bg-opacity-10 transition duration-200">核心优势</a>
                </div>
            </div>
        </div>
    </section>

    <!-- Intro Section -->
    <section id="ci-cd-intro" class="py-16 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col md:flex-row gap-12">
                <div class="md:w-1/2">
                    <h2 class="serif text-3xl font-bold mb-6">什么是持续集成（CI）与持续部署（CD）</h2>
                    <p class="mb-6 text-gray-700">持续集成（Continuous Integration，CI）是指开发人员将代码频繁地合并到主分支中，并通过自动化的构建与测试来验证每次提交的代码是否能够正常工作。</p>
                    <p class="mb-6 text-gray-700">持续部署（Continuous Deployment，CD）是指将每次代码更新自动化地部署到生产环境，确保软件可以持续交付给用户。</p>
                    
                    <div class="bg-blue-50 border-l-4 border-blue-500 p-4 my-6 rounded-r">
                        <div class="flex">
                            <div class="flex-shrink-0 text-blue-500">
                                <i class="fas fa-lightbulb text-xl"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-sm text-blue-700">
                                    <strong>关键洞察：</strong> CI/CD 不仅仅是工具链，更是一种开发文化转变，要求团队建立快速反馈、持续改进的工作模式。
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="md:w-1/2">
                    <div class="bg-white rounded-xl shadow-lg overflow-hidden card-hover">
                        <div class="p-6">
                            <div class="flex items-center mb-4">
                                <div class="p-3 rounded-full bg-indigo-100 text-indigo-600 mr-3">
                                    <i class="fas fa-cogs text-xl"></i>
                                </div>
                                <h3 class="text-xl font-bold">CI关键要素</h3>
                            </div>
                            <ul class="space-y-3">
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                    <span>频繁的代码提交与自动化构建</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                    <span>全面的自动化测试覆盖</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                    <span>快速的构建反馈循环</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    
                    <div class="bg-white rounded-xl shadow-lg overflow-hidden mt-6 card-hover">
                        <div class="p-6">
                            <div class="flex items-center mb-4">
                                <div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-3">
                                    <i class="fas fa-rocket text-xl"></i>
                                </div>
                                <h3 class="text-xl font-bold">CD关键要素</h3>
                            </div>
                            <ul class="space-y-3">
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                    <span>自动化发布流程</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                    <span>生产环境监控与报警</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                    <span>快速的用户反馈循环</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Visualization Section -->
    <section class="py-16 px-4 bg-gray-50">
        <div class="container mx-auto max-w-5xl">
            <h2 class="serif text-3xl font-bold mb-12 text-center">CI/CD 工作流程与工具生态</h2>
            
            <div class="bg-white rounded-xl shadow-lg p-6">
                <div class="mermaid">
                    graph LR
                    A[开发者提交代码] --> B[代码仓库]
                    B --> C[CI服务器]
                    C --> D[构建]
                    C --> E[单元测试]
                    C --> F[集成测试]
                    C --> G[代码质量检查]
                    D --> H[构建产物]
                    E --> I[测试报告]
                    F --> I
                    G --> J[分析报告]
                    H --> K[CD服务器]
                    I --> K
                    J --> K
                    K --> L[部署到测试环境]
                    L --> M[自动化验收测试]
                    M --> N[部署到生产环境]
                    N --> O[监控与反馈]
                    O --> A

                    classDef tool fill:#e0f2fe,stroke:#0ea5e9;
                    class B,GitHub,GitLab,Bitbucket tool;
                    class C,Jenkins,CircleCI,GitLabCI,TravisCI tool;
                    class G,SonarQube,Checkstyle tool;
                    class K,Spinnaker,ArgoCD,Helm tool;
                    class O,Prometheus,Grafana,ELK tool;

                    click A "#ci-process" "开发者工作流"
                    click B "#version-control" "版本控制工具"
                    click C "#ci-tools" "CI工具"
                    click D "#build" "构建阶段"
                    click E "#testing" "测试阶段"
                    click G "#code-quality" "代码质量"
                    click K "#cd-tools" "CD工具"
                    click L "#deployment" "部署阶段"
                    click O "#monitoring" "监控工具"
                </div>
                <div id="mermaid-tooltip" class="mermaid-tooltip"></div>
            </div>
            
            <div class="grid grid-cols-2 md:grid-cols-4 gap-4 mt-8">
                <a href="#version-control" class="bg-white p-4 rounded-lg shadow-sm hover:shadow-md transition duration-200 text-center">
                    <i class="fab fa-git-alt text-3xl text-orange-500 mb-2"></i>
                    <p class="font-medium">版本控制</p>
                </a>
                <a href="#ci-tools" class="bg-white p-4 rounded-lg shadow-sm hover:shadow-md transition duration-200 text-center">
                    <i class="fas fa-server text-3xl text-blue-500 mb-2"></i>
                    <p class="font-medium">CI工具</p>
                </a>
                <a href="#testing" class="bg-white p-4 rounded-lg shadow-sm hover:shadow-md transition duration-200 text-center">
                    <i class="fas fa-vial text-3xl text-green-500 mb-2"></i>
                    <p class="font-medium">测试框架</p>
                </a>
                <a href="#cd-tools" class="bg-white p-4 rounded-lg shadow-sm hover:shadow-md transition duration-200 text-center">
                    <i class="fas fa-ship text-3xl text-purple-500 mb-2"></i>
                    <p class="font-medium">CD工具</p>
                </a>
            </div>
        </div>
    </section>

    <!-- Implementation Section -->
    <section id="implementation" class="py-16 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-16">
                <h2 class="serif text-3xl font-bold mb-4">如何实施CI/CD流程</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">从零开始构建自动化开发流程的关键步骤与最佳实践</p>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <h3 id="ci-process" class="text-2xl font-bold mb-6 flex items-center">
                        <span class="bg-indigo-100 text-indigo-600 w-10 h-10 rounded-full flex items-center justify-center mr-4">1</span>
                        持续集成实施方法
                    </h3>
                    
                    <div class="space-y-6">
                        <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                            <h4 class="font-bold mb-3 flex items-center">
                                <i class="fas fa-tools text-blue-500 mr-2"></i>
                                配置自动化构建工具
                            </h4>
                            <p class="text-gray-700 mb-3">选择并配置合适的自动化构建工具，如 Jenkins、GitLab CI、Travis CI 等。</p>
                            <ul class="text-gray-700 space-y-2 pl-5">
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mr-2 mt-1"></i>
                                    <span>确保构建脚本能够正确执行构建、测试和部署任务</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mr-2 mt-1"></i>
                                    <span>使用 Maven、Gradle 等工具管理项目依赖</span>
                                </li>
                            </ul>
                        </div>
                        
                        <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                            <h4 class="font-bold mb-3 flex items-center">
                                <i class="fas fa-vial text-green-500 mr-2"></i>
                                编写自动化测试
                            </h4>
                            <p class="text-gray-700 mb-3">自动化测试是持续集成的核心环节，需要覆盖不同层次的测试。</p>
                            <div class="grid grid-cols-3 gap-4 mt-4">
                                <div class="bg-blue-50 p-3 rounded-lg text-center">
                                    <i class="fas fa-cube text-blue-500 text-xl mb-2"></i>
                                    <p class="text-sm font-medium">单元测试</p>
                                </div>
                                <div class="bg-green-50 p-3 rounded-lg text-center">
                                    <i class="fas fa-puzzle-piece text-green-500 text-xl mb-2"></i>
                                    <p class="text-sm font-medium">集成测试</p>
                                </div>
                                <div class="bg-purple-50 p-3 rounded-lg text-center">
                                    <i class="fas fa-user-check text-purple-500 text-xl mb-2"></i>
                                    <p class="text-sm font-medium">端到端测试</p>
                                </div>
                            </div>
                        </div>
                        
                        <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                            <h4 class="font-bold mb-3 flex items-center">
                                <i class="fas fa-search text-yellow-500 mr-2"></i>
                                代码质量检查
                            </h4>
                            <p class="text-gray-700 mb-3">通过静态代码分析工具确保代码质量，减少技术债务。</p>
                            <div class="flex flex-wrap gap-2 mt-3">
                                <span class="bg-yellow-100 text-yellow-800 px-3 py-1 rounded-full text-sm">SonarQube</span>
                                <span class="bg-yellow-100 text-yellow-800 px-3 py-1 rounded-full text-sm">Checkstyle</span>
                                <span class="bg-yellow-100 text-yellow-800 px-3 py-1 rounded-full text-sm">PMD</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div>
                    <h3 id="cd-process" class="text-2xl font-bold mb-6 flex items-center">
                        <span class="bg-purple-100 text-purple-600 w-10 h-10 rounded-full flex items-center justify-center mr-4">2</span>
                        持续部署实施方法
                    </h3>
                    
                    <div class="space-y-6">
                        <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                            <h4 class="font-bold mb-3 flex items-center">
                                <i class="fab fa-docker text-blue-500 mr-2"></i>
                                容器化与部署工具
                            </h4>
                            <p class="text-gray-700 mb-3">选择合适的部署工具来实现自动化发布流程。</p>
                            <div class="mt-4">
                                <div class="flex items-center mb-3">
                                    <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-3">
                                        <i class="fab fa-docker text-blue-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Docker</p>
                                        <p class="text-sm text-gray-500">应用容器化打包</p>
                                    </div>
                                </div>
                                <div class="flex items-center mb-3">
                                    <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-3">
                                        <i class="fas fa-cubes text-blue-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Kubernetes</p>
                                        <p class="text-sm text-gray-500">容器编排管理</p>
                                    </div>
                                </div>
                                <div class="flex items-center">
                                    <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-3">
                                        <i class="fas fa-code text-blue-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Terraform</p>
                                        <p class="text-sm text-gray-500">基础设施即代码</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                            <h4 class="font-bold mb-3 flex items-center">
                                <i class="fas fa-undo text-red-500 mr-2"></i>
                                回滚机制
                            </h4>
                            <p class="text-gray-700 mb-3">确保在部署出现问题时能够快速回退到稳定版本。</p>
                            <div class="grid grid-cols-2 gap-4 mt-4">
                                <div class="bg-red-50 p-4 rounded-lg">
                                    <h5 class="font-medium text-sm mb-1 text-red-700">蓝绿部署</h5>
                                    <p class="text-xs text-gray-600">同时运行新旧版本，快速切换</p>
                                </div>
                                <div class="bg-yellow-50 p-4 rounded-lg">
                                    <h5 class="font-medium text-sm mb-1 text-yellow-700">灰度发布</h5>
                                    <p class="text-xs text-gray-600">逐步向部分用户发布新版本</p>
                                </div>
                            </div>
                        </div>
                        
                        <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                            <h4 class="font-bold mb-3 flex items-center">
                                <i class="fas fa-chart-line text-green-500 mr-2"></i>
                                监控与报警
                            </h4>
                            <p class="text-gray-700 mb-3">实时监控生产环境，及时发现问题并响应。</p>
                            <div class="flex flex-wrap gap-2 mt-3">
                                <span class="bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm">Prometheus</span>
                                <span class="bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm">Grafana</span>
                                <span class="bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm">ELK</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Benefits Section -->
    <section id="benefits" class="py-16 px-4 bg-gray-50">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-12">
                <h2 class="serif text-3xl font-bold mb-4">CI/CD的核心价值</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">实施持续集成与持续部署为团队带来的主要优势</p>
            </div>
            
            <div class="grid md:grid-cols-3 gap-8">
                <div class="bg-white p-8 rounded-xl shadow-sm border border-gray-100 hover:border-indigo-200 transition duration-200">
                    <div class="text-indigo-500 mb-4">
                        <i class="fas fa-bolt text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">提高开发效率</h3>
                    <p class="text-gray-700">自动化构建、测试和部署减少手动工作，使开发人员能够专注于功能开发而非重复性任务。</p>
                </div>
                
                <div class="bg-white p-8 rounded-xl shadow-sm border border-gray-100 hover:border-green-200 transition duration-200">
                    <div class="text-green-500 mb-4">
                        <i class="fas fa-star text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">提升代码质量</h3>
                    <p class="text-gray-700">自动化测试和代码质量检查确保每次提交都符合质量标准，减少技术债务积累。</p>
                </div>
                
                <div class="bg-white p-8 rounded-xl shadow-sm border border-gray-100 hover:border-blue-200 transition duration-200">
                    <div class="text-blue-500 mb-4">
                        <i class="fas fa-shield-alt text-3xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3">降低风险</h3>
                    <p class="text-gray-700">频繁的小批量变更比大规模发布更安全，出现问题更容易定位和修复。</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Challenges Section -->
    <section class="py-16 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-12">
                <h2 class="serif text-3xl font-bold mb-4">实施CI/CD的挑战与解决方案</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">识别并克服实施过程中的常见障碍</p>
            </div>
            
            <div class="space-y-6">
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                    <h3 class="text-xl font-bold mb-3">环境一致性问题</h3>
                    <p class="text-gray-700 mb-4">开发环境、测试环境和生产环境可能存在差异，导致"在我机器上能运行"的问题。</p>
                    <div class="bg-blue-50 p-4 rounded-lg">
                        <h4 class="font-medium text-blue-700 mb-2">解决方案：</h4>
                        <ul class="text-blue-700 space-y-2">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-blue-500 mr-2 mt-1"></i>
                                <span>使用Docker容器化应用，确保环境一致性</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-blue-500 mr-2 mt-1"></i>
                                <span>采用基础设施即代码(Terraform)管理环境</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                    <h3 class="text-xl font-bold mb-3">测试覆盖率不足</h3>
                    <p class="text-gray-700 mb-4">自动化测试覆盖率低会导致CI/CD流程无法有效保证软件质量。</p>
                    <div class="bg-green-50 p-4 rounded-lg">
                        <h4 class="font-medium text-green-700 mb-2">解决方案：</h4>
                        <ul class="text-green-700 space-y-2">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mr-2 mt-1"></i>
                                <span>实施测试驱动开发(TDD)文化</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mr-2 mt-1"></i>
                                <span>定期评审和优化测试用例，关注关键路径</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                    <h3 class="text-xl font-bold mb-3">文化转变阻力</h3>
                    <p class="text-gray-700 mb-4">团队可能抵触频繁提交、自动化测试等CI/CD要求的实践。</p>
                    <div class="bg-purple-50 p-4 rounded-lg">
                        <h4 class="font-medium text-purple-700 mb-2">解决方案：</h4>
                        <ul class="text-purple-700 space-y-2">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-500 mr-2 mt-1"></i>
                                <span>从小规模试点开始，展示CI/CD价值</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-purple-500 mr-2 mt-1"></i>
                                <span>提供培训和支持，帮助团队适应新流程</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Best Practices Section -->
    <section class="py-16 px-4 bg-gray-50">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-12">
                <h2 class="serif text-3xl font-bold mb-4">CI/CD最佳实践</h2>
                <p class="text-gray-600 max-w-3xl mx-auto">确保CI/CD流程高效可靠的关键原则</p>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div>
                    <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100 mb-6">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 text-indigo-500 bg-indigo-100 p-3 rounded-lg mr-4">
                                <i class="fas fa-running text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-bold mb-2">小步快跑，频繁集成</h3>
                                <p class="text-gray-700">避免一次提交大量代码。频繁集成可以确保每次提交的代码都能够顺利构建和测试，减少集成时出现问题的风险。</p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 text-green-500 bg-green-100 p-3 rounded-lg mr-4">
                                <i class="fas fa-robot text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-bold mb-2">自动化为核心</h3>
                                <p class="text-gray-700">将构建、测试和部署过程都自动化，减少人为干预，确保开发流程的高效性和一致性。</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div>
                    <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100 mb-6">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 text-blue-500 bg-blue-100 p-3 rounded-lg mr-4">
                                <i class="fas fa-code-branch text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-bold mb-2">版本控制和标签管理</h3>
                                <p class="text-gray-700">在持续部署中，团队应该使用版本控制和标签管理来确保每次发布的版本是可追溯的。</p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
                        <div class="flex items-start">
                            <div class="flex-shrink-0 text-purple-500 bg-purple-100 p-3 rounded-lg mr-4">
                                <i class="fas fa-shield-alt text-xl"></i>
                            </div>
                            <div>
                                <h3 class="text-xl font-bold mb-2">保持生产环境稳定</h3>
                                <p class="text-gray-700">确保生产环境始终稳定，避免频繁修改或调整，以免影响用户体验。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Call to Action -->
    <section class="py-16 px-4">
        <div class="container mx-auto max-w-3xl text-center">
            <div class="bg-indigo-50 rounded-xl p-8">
                <h2 class="serif text-3xl font-bold mb-4">开始您的CI/CD之旅</h2>
                <p class="text-gray-700 mb-6">无论您是刚开始探索自动化流程，还是希望优化现有的CI/CD实践，持续集成与持续部署都将为您的团队带来显著的效率提升和质量改进。</p>
                <a href="http://www.yuque.com/jtostring" class="inline-block bg-indigo-600 text-white px-6 py-3 rounded-lg font-medium hover:bg-indigo-700 transition duration-200">了解更多开发实践</a>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-12 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col items-center">
                <div class="text-2xl font-bold mb-4 text-white">技术小馆</div>
                <p class="mb-6 text-center max-w-md">专注于分享现代化软件开发实践与架构设计</p>
                <div class="mb-8">
                    <a href="http://www.yuque.com/jtostring" class="text-indigo-400 hover:text-indigo-300 transition duration-200">http://www.yuque.com/jtostring</a>
                </div>
                <div class="flex space-x-4">
                    <a href="#" class="text-gray-400 hover:text-white transition duration-200">
                        <i class="fab fa-github text-xl"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white transition duration-200">
                        <i class="fab fa-twitter text-xl"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white transition duration-200">
                        <i class="fab fa-linkedin text-xl"></i>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            mermaid.initialize({
                startOnLoad: true,
                theme: 'default',
                flowchart: {
                    useMaxWidth: true,
                    htmlLabels: true,
                    curve: 'basis'
                }
            });
            
            // 简单的工具提示交互
            const mermaidNodes = document.querySelectorAll('.mermaid .node');
            const tooltip = document.getElementById('mermaid-tooltip');
            
            mermaidNodes.forEach(node => {
                const title = node.getAttribute('title');
                if (title) {
                    node.addEventListener('mouseenter', (e) => {
                        tooltip.textContent = title;
                        tooltip.style.display = 'block';
                        const rect = node.getBoundingClientRect();
                        tooltip.style.left = `${rect.left + rect.width / 2 - tooltip.offsetWidth / 2}px`;
                        tooltip.style.top = `${rect.top - tooltip.offsetHeight - 10}px`;
                    });
                    
                    node.addEventListener('mouseleave', () => {
                        tooltip.style.display = 'none';
                    });
                }
            });
        });
    </script>
</body>
</html>